/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bookstore.service;

import bookstore.idao.IOrderDao;
import bookstore.idao.IOrderDetailsDao;
import bookstore.iservice.IOrderService;
import bookstore.model.Customer;
import bookstore.model.Order;
import java.util.List;

/**
 *
 * @author MY
 */
public class OrderService implements IOrderService{
    
    private IOrderDao orderDao;
    
    
    @Override
    public int  addOrder(Order order){
         return orderDao.add(order);
    }

    @Override
    public void setOrderDao(IOrderDao orderDao) {
       this.orderDao = orderDao;
    }

    @Override
    public List<Order> findAll() {
       return this.orderDao.findAll();
    }
    @Override
    public List<Order> findOrder(Customer customer)
    {
        return this.orderDao.findOrder(customer);
    }
}
